# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapynetsdr
pkgver=0.2.0
_pkgname=SoapyNetSDR
_gitver=soapy-netsdr-$pkgver
pkgrel=2
pkgdesc='Soapy SDR plugin for the NetSDR protocol'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyNetSDR'
license=('GPL3')
depends=('soapysdr')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('84d6936ef51cb10289250171bcf50fbbb758e8d5488d4cd8ff063dfe43aa3870118006f93aaafa3a485a185fc343285c424c4b3f40aaeebb97d7726da70602f7')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

